# -*- coding: utf-8 -*-
"""
Created on Sun Jul 22 09:58:35 2018

@author: 君
"""
"""
while True:
    lines = fileSchoolId.readline() # 整行读取数据
    if not lines:
        break
        pass
    data = lines
"""
"""
import re
schoolId = {}
fileSchoolId = open('all_school.txt','r',encoding='utf-8')
#循环读取文件每一行
while True:
    lines = fileSchoolId.readline() # 整行读取数据
    #为空行则遍历文件结束，退出循环
    if not lines:
        break
    try:
        strSchool = re.findall(u"[\u4e00-\u9fa5]+|[0-9]\d*",lines)[0]
        strSchoolId = re.findall(r"[0-9]\d*",lines)[0]
        schoolId[strSchoolId] = strSchool
    except Exception as err:
        print('改行查询失败，重试中。。。')
        continue
fileSchoolId.close()

"""
import json
fileSchoolId = open('allSchoolId.txt','r',encoding='utf-8')
line = fileSchoolId.readline()
data = json.loads(line)
schoolIdList = list(data.keys())
fileSchoolId.close()